app.factory("queryparser", [function () {
    function QueryParser() {
    };
    QueryParser.prototype = {
        get: function (key) {
            var queryStr = unescape(window.location.search) + "&";
            var regex = new RegExp(".*?[&\\?]" + key + "=(.*?)&.*");
            var val = queryStr.replace(regex, "$1");
            return val == queryStr ? false : val;
        }
    }
    return new QueryParser();
} ]);